//案例
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:new_yuqib_app/yqbConfig/color_theme.dart';
import 'package:new_yuqib_app/yqbConfig/file_path.dart';
import 'package:new_yuqib_app/yqbConfig/yqb_base.dart';

class AlWidget extends StatelessWidget {
  const AlWidget({super.key});

  @override
  Widget build(BuildContext context) {
    return Stack(
      children: [
        Container(
          decoration: BoxDecoration(
            color: Colors.white,
            borderRadius: BorderRadius.circular(4),
          ),
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              const SizedBox(height: 8),
              Row(
                children: [
                  const SizedBox(width: 8),
                  Container(
                    width: 50,
                    height: 50,
                    decoration: BoxDecoration(
                        borderRadius: BorderRadius.circular(50),
                        image: const DecorationImage(
                          image: NetworkImage(testAvatarUrl),
                          fit: BoxFit.fill,
                        )),
                  ),
                  const SizedBox(width: 8),
                  Column(
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: [
                      RichText(
                          text: const TextSpan(
                              style: TextStyle(
                                  fontSize: 16, color: ColorTheme.primaryTextColor),
                              children: [
                            TextSpan(
                                text: "夏女士",
                                style: TextStyle(fontWeight: FontWeight.bold)),
                            WidgetSpan(child: SizedBox(width: 8)),
                            TextSpan(
                                text: "26岁",
                                style:
                                    TextStyle(color: ColorTheme.primaryTextColor2)),
                          ])),
                      const Text(
                        "创业失败",
                        style: TextStyle(
                            fontSize: 12, color: ColorTheme.secondaryTextColor),
                      )
                    ],
                  ),
                ],
              ),
              const Divider(color: ColorTheme.primaryColor),
              Padding(
                padding: const EdgeInsets.fromLTRB(8, 0, 8, 6),
                child: Column(
                  crossAxisAlignment: CrossAxisAlignment.start,
                  children: [
                    RichText(
                      text: TextSpan(
                        style: const TextStyle(color: ColorTheme.primaryTextColor),
                        children: [
                          const TextSpan(
                              text: "逾期平台",
                              style:
                                  TextStyle(color: ColorTheme.secondaryTextColor)),
                          const WidgetSpan(child: SizedBox(width: 24)),
                          const TextSpan(text: "农业银行"),
                          const WidgetSpan(child: SizedBox(width: 8)),
                          WidgetSpan(
                            child: Container(
                              padding:
                                  const EdgeInsets.symmetric(horizontal: 8, vertical: 2),
                              decoration: BoxDecoration(
                                color: ShadowColor.loginButtonShadowColor2,
                                borderRadius: BorderRadius.circular(2),
                              ),
                              child: const Text(
                                "信用卡",
                                style: TextStyle(
                                    fontSize: 12,
                                    color: ColorTheme.buttonTextColor),
                              ),
                            ),
                          ),
                        ],
                      ),
                    ),
                    RichText(
                      text: const TextSpan(
                          style: TextStyle(color: ColorTheme.primaryTextColor),
                          children: [
                            TextSpan(
                                text: "逾期金额",
                                style: TextStyle(
                                    color: ColorTheme.secondaryTextColor)),
                            WidgetSpan(child: SizedBox(width: 24)),
                            TextSpan(text: "27万"),
                          ]),
                    ),
                  ],
                ),
              )
            ],
          ),
        ),
        Positioned(top: 0,right: 0,child: Image.asset(FilePath.alTagPath,width: 56)),
      ],
    );
  }
}
